package com.rex.sample.dao;

import com.rex.sample.model.SampleModel;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository("sampleDao")
public class SampleDao extends  GenericDaoHibernate<SampleModel, Long> {
	
	public SampleDao() {
		super(SampleModel.class);

	}

	public String sayHello(){

		StringBuilder sb = new StringBuilder();
		List<SampleModel> list = getAll();
		for(SampleModel m : list){

			sb.append(m.getSampleName()).append("<br>");
		}

		return sb.toString();
	}

	public void addHello(SampleModel vo){

		save(vo);
	}

}
